<template>
<div class="visit-list">

    <div class="panel-header">
        <span class="title">
            <i class="el-icon-tickets"></i>
            跟进记录
        </span>
        <span class="ftitle">[{{visitList.length}}次]</span>
    </div>

    <el-table :data="visitList" border>
        <el-table-column label="跟进人" prop="user.realname" width="120"></el-table-column>
        <el-table-column label="跟进状态" prop="status_title" width="100"></el-table-column>
        <el-table-column label="跟进时间" prop="create_time" width="140"></el-table-column>
        <el-table-column label="下次跟进" prop="next_visit_time" width="140"></el-table-column>
        <el-table-column label="备注" prop="remark" show-overflow-tooltip></el-table-column>
        <el-table-column label="附件" width="140">
            <template slot-scope="scope">
                <el-image  v-if="scope.row.files.length" style="width: 100px; height: 100px" :src="scope.row.files[0]['url']" :preview-src-list="scope.row.files.map(ele=>ele.url)"></el-image>
            </template>
        </el-table-column>
    </el-table>
</div>
</template>

<script>
export default {
    props: {
        visitList: {
            type: Array,
            default: []
        }
    }
}
</script>

<style lang="scss">
.visit-list {
    .panel-header {
        margin-top: 10px;
        padding: 10px 0;

        .title {
            font-weight: bold;
            font-size: 16px;
            color: #F56C6C;
        }

        .ftitle {
            font-size: 14px;
            padding: 0 3px;
        }
    }

    .field-width {
        width: 6rem;
    }
}
</style>
